#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "msgsocket.h"
#include "loginform.h"

#include "realtimeform.h"
#include "homedevform.h"
#include "dataanalystform.h"
#include "homechatform.h"
#include "personinfoform.h"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public slots:
    void slotUserLogin(QString id, QString pswd);
    void slotUserLoginResult(bool res);
    void slotUserLogout(void);
    void slotUserLogoutResult(bool res);
    void slotHomeChat(QString msg);

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private slots:
    void on_actionEnv_triggered();
    void on_actionDev_triggered();
    void on_actionData_triggered();
    void on_actionChat_triggered();
    void on_actionInfo_triggered();

private:
    Ui::MainWindow *ui;

    bool m_isCloseSystem;
    MsgSocket *m_msgSocket;
    LoginForm *m_loginForm;

    RealTimeForm *m_envForm;
    HomeDevForm *m_devForm;
    DataAnalystForm *m_dataAnalyForm;
    HomeChatForm *m_chatForm;
    PersonInfoForm *m_personForm;
};

#endif // MAINWINDOW_H
